<template>
	<view>
		<!-- <back-fixed title="智能名片"></back-fixed> -->
		<view class="main">
			<view class="list_box">
				<view class="list_line" @click="nav(v.url)" v-for="v in navList" :key="v.title">
					<view class="list_line_left">
						<view class="">
							<!-- <u-image width="40rpx" height="38rpx" :src="v.icon"></u-image> -->
						</view>
						<view class="list_line_left_text">
							{{v.title}}
						</view>
					</view>
					<view class="">
						<u-icon name="arrow-right" size="28" color="#CCCCCC"></u-icon>
					</view>
				</view>
			</view>
		</view>
	</view>


</template>

<script>
	import {
		checkToken,
		checkAuth
	} from '@/utils/index.js'
	export default {
		data() {
			return {
				navList: [{
						title: '关于我们',
						url: 'about'
					},
					{
						title: '退出登录',
						url: 'exit'
					}
				],
			}
		},
		onLoad() {

		},
		methods: {
			nav(item) {
				if (item == 'about') {
					//if (!checkToken()) return
					//if (!checkAuth()) return
					uni.navigateTo({
						url: '/pages/my/about'
					});
				}
				if (item == 'exit') {
					uni.showModal({
						title: '温馨提示',
						content: '请确认是否退出登录',
						cancelColor: '#333333',
						confirmColor: '#4DC0D9',
						customStyle: {
							content: 'color: #333333;' // 这里可以设置你想要的颜色
						},
						success: (res) => {
							if (res.confirm) {
								uni.removeStorageSync('token')
								uni.removeStorageSync('userinfo')
								uni.removeStorageSync('qw')
								uni.removeStorageSync('isLogin')
								uni.removeStorageSync('zhichengName')
								uni.removeStorageSync('qrUrl')
								uni.removeStorageSync('myTeam')
								uni.removeStorageSync('code')
								//uni.removeStorageSync('redirect')
								this.$u.toast('正在退出登录')
								setTimeout(() => {
									uni.navigateTo({
										url: '/pages/login/auth'
									})
								}, 2000)
							} else if (res.cancel) {
								return false
								//console.log('用户点击取消');
							}
						}
					});
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		position: absolute;
		height: 100vh;
		background-color: #F8F8F8;
		//padding-top: 10px;
		width: 100%;

		.list_box {
			background-color: #F8F8F8;
			//	margin-top: ;
			margin-top: 40rpx;
			//border-radius: 20rpx;

			.list_line {
				display: flex;
				padding: 24rpx;
				align-items: center;
				justify-content: space-between;
				margin-top: 20rpx;
				background-color: white;

				.list_line_left {
					display: flex;

					.list_line_left_text {
						font-family: PingFang SC, PingFang SC;
						font-weight: 500;
						font-size: 32rpx;
						color: #212121;
						line-height: 38rpx;
						margin-left: 30rpx;
					}
				}

				.list_line_right {}
			}
		}
	}
</style>